import isObject from './isObject';

/**
 * @description: 快捷提示
 * @param {String|object} options 提示文案或对象参数
 * @param {Number} duration 默认 1500 ms
 */
export default function showToast(options, duration = 1500) {
  uni.showToast(Object.assign({
    title: '',
    icon: 'none',
    duration,
  }, isObject(options) ? options : { title: options }));
}
